-- GENERATED SPELL FOR [Shattered Hand Sharpshooter] --


function spell0_16704(pUnit, Event) --@Incendiary Shot,n/a--
pUnit:FullCastSpellOnTarget(30481,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16704', 13000, 1)
end

function spell1_16704(pUnit, Event) --@Incendiary Shot,n/a--
pUnit:FullCastSpellOnTarget(35945,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16704', 13000, 1)
end

function spell2_16704(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15620,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16704', 586, 1)
end

function spell3_16704(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16704', 583, 1)
end

function spell4_16704(pUnit, Event) --@Viper Sting,Drain--
pUnit:FullCastSpellOnTarget(37551,pUnit:GetRandomPlayer(4))
pUnit:RegisterEvent('Sorts_16704', 8000, 1)
end

function Sorts_16704(pUnit, Event)
local choix_sorts_16704 = math.random(0, 4)
if choix_sorts_16704 == 0 then
pUnit:RegisterEvent('spell0_16704', 1, 1)
end
if choix_sorts_16704 == 1 then
pUnit:RegisterEvent('spell1_16704', 1, 1)
end
if choix_sorts_16704 == 2 then
pUnit:RegisterEvent('spell2_16704', 1, 1)
end
if choix_sorts_16704 == 3 then
pUnit:RegisterEvent('spell3_16704', 1, 1)
end
if choix_sorts_16704 == 4 then
pUnit:RegisterEvent('spell4_16704', 1, 1)
end
end

function mob16704_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16704', math.random(1500, 3000), 1)
end

function mob16704_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16704_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16704_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16704, 1, 'mob16704_Action')
RegisterUnitEvent(16704, 2, 'mob16704_Leave')
RegisterUnitEvent(16704, 3, 'mob16704_Kill')
RegisterUnitEvent(16704, 4, 'mob16704_Die')
